home *** CD-ROM | disk | FTP | other *** search
/ Hardcore Gamer Resource Kit / Hardcore Gamer Resource Kit - Disc 2.iso / Utils / UNIX / UNZIP520 / AMIGA / AMIGA.H < prev    next >
C/C++ Source or Header  |  1996-04-15  |  3KB  |  88 lines

  1. /* amiga.h
  2.  *
  3.  * Globular definitions that affect all of AmigaDom.
  4.  *
  5.  * Originally included in unzip.h, extracted for simplicity and eeze of
  6.  * maintenance by John Bush.
  7.  *
  8.  * THIS FILE IS #INCLUDE'd by unzip.h 
  9.  *
  10.  */
  11.  
  12. #include <time.h>
  13. #include <fcntl.h>
  14.  
  15. #ifdef AZTEC_C                    /* Manx Aztec C, 5.0 or newer only */
  16. #  include <clib/dos_protos.h>
  17. #  include <pragmas/dos_lib.h>        /* do inline dos.library calls */
  18. #  define O_BINARY 0
  19. #  include "amiga/z-stat.h"               /* substitute for <stat.h> */
  20. #  define direct dirent
  21.  
  22. #  define DECLARE_TIMEZONE
  23. #  define MALLOC_WORK
  24. #  define ASM_INFLATECODES
  25. #  define ASM_CRC
  26.  
  27. /* Note that defining REENTRANT will not eliminate all global/static */
  28. /* variables.  The functions we use from c.lib, including stdio, are */
  29. /* not reentrant.  Neither are the stuff in amiga/stat.c or the time */
  30. /* functions in amiga/filedate.c, because they just augment c.lib.   */
  31. /* If you want a fully reentrant and reexecutable "pure" UnZip with  */
  32. /* Aztec C, assemble and link in the startup module purify.a by Paul */
  33. /* Kienitz.  REENTRANT should be used to reduce memory waste, though */
  34. /* it is not strictly necessary, since G is now a static struct.     */
  35. #endif /* AZTEC_C */
  36.  
  37.  
  38. #if defined(LATTICE) || defined(__SASC) || defined(__SASC_60)
  39. #  include <sys/types.h>         
  40. #  include <sys/stat.h>
  41. #  include <sys/dir.h>
  42. #  include <dos.h>
  43. #  include <proto/dos.h>  /* needed? */
  44. #  if ( (!defined(O_BINARY)) && defined(O_RAW))
  45. #    define O_BINARY O_RAW
  46. #  endif
  47. #endif /* LATTICE */
  48.  
  49. #define USE_EF_UX_TIME
  50. #define AMIGA_FILENOTELEN 80
  51. #define DATE_FORMAT       DF_MDY
  52. #define lenEOL            1
  53. #define PutNativeEOL      *q++ = native(LF);
  54. #define PIPE_ERROR        0
  55. /* #define USE_FWRITE if write() returns 16-bit int */
  56.  
  57. #ifdef GLOBAL         /* crypt.c usage conflicts with AmigaDOS headers */
  58. #  undef GLOBAL
  59. #endif
  60.  
  61.  
  62. /* Funkshine Prough Toe Taipes */
  63.  
  64. LONG FileDate (char *, time_t[]);
  65. int windowheight (BPTR fh);
  66.  
  67. #define SCREENLINES windowheight(Output())
  68.  
  69.  
  70. /* Static variables that we have to add to struct Globals: */
  71. #define SYSTEM_SPECIFIC_GLOBALS \
  72.     int N_flag;\
  73.     int filenote_slot;\
  74.     char *(filenotes[DIR_BLKSIZ]);\
  75.     int created_dir, renamed_fullpath, rootlen;\
  76.     char *rootpath, *buildpath, *build_end;\
  77.     DIR *wild_dir;\
  78.     char *dirname, *wildname, matchname[FILNAMSIZ];\
  79.     int dirnamelen, notfirstcall;
  80.  
  81. /* N_flag, filenotes[], and filenote_slot are for the -N option that      */
  82. /*    restores zipfile comments as AmigaDOS filenotes.  The others        */
  83. /*    are used by functions in amiga/amiga.c only.                        */
  84. /* created_dir and renamed_fullpath are used by mapname() and checkdir(). */
  85. /* rootlen, rootpath, buildpath, and build_end are used by checkdir().    */
  86. /* wild_dir, dirname, wildname, matchname[], dirnamelen and notfirstcall  */
  87. /*    are used by do_wild().                                              */
  88.